package com.example.blog.dao;

import com.example.blog.dto.ArticleDTO;
import com.example.blog.pojo.Article;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.time.LocalDateTime;
import java.util.List;

@Repository
@Mapper
public interface ArticleDao {

    Article findById(Integer id);

    List<ArticleDTO> list(Integer categoryId, Integer status);

    Integer addArticle(Article article);

    Integer updateArticle(Integer userid,Integer id, String title, String content,String abstracts,Integer category,String message,LocalDateTime updatetime,Integer status);

    Integer findUseridById(Integer id);

    Integer updateLikenumber(Integer articleid);

    List<ArticleDTO> findByUserid(Integer userid,Integer status);

    Integer deleteById(Integer id,Integer userid);

    Integer updateStatus(Integer id,Integer status,String message,LocalDateTime updatetime);
    String findContentById(Integer id);

    List<ArticleDTO> findArticle(Integer categoryId, Integer status);



}
